using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;

namespace ClientTools.Library.DocumentTypes
{
    public class GenericProperty
    {

        private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        private string _alias;

        public string Alias
        {
            get { return _alias; }
            set { _alias = value; }
        }

        private string _type;

        public string Type
        {
            get { return _type; }
            set { _type = value; }
        }
	

        private string _tab;

        public string Tab
        {
            get { return _tab; }
            set { _tab = value; }
        }
	
        private bool _mandatory;

	    public bool Mandatory
	    {
		    get { return _mandatory;}
		    set { _mandatory = value;}
	    }

        private string _validation;

        public string Validation
        {
            get { return _validation; }
            set { _validation = value; }
        }
	
        private string _description;
        [XmlIgnore]
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
        
        [XmlElement("Description")]
        public XmlCDataSection DescriptionCdata
        {
            get
            {
                XmlDataDocument doc = new XmlDataDocument();
                XmlCDataSection cd = doc.CreateCDataSection(_description);
                return cd;
            }
            set { _description = value.Value; }
        }
	
    }
}
